.text-message-view {
  position: relative;
  width: 100%;
  min-height: 48px;

  .text-message-wrapper {
    padding: 0 8px 8px 8px;
    overflow: hidden;
    white-space: pre;
    text-align: left;
    word-wrap: break-word;
    word-break: break-all;
    cursor: default;

    .message-time {
      color: #333;
      font-size: 12px;

      &.sender {
        text-align: right;
      }

      &.receiver {
        text-align: left;
      }
    }

    &.sender {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
    }

    &.receiver {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
    }

    .bubble {
      display: flex;

      &.sender {
        align-items: flex-end;
        justify-content: flex-end;
      }

      &.receiver {
        align-items: flex-end;
        justify-content: flex-start;
      }

      .text-item {
        width: fit-content;
        max-width: 500px;
        padding: 8px;
        overflow: hidden;
        font-size: 14px;
        white-space: break-spaces;
        text-overflow: ellipsis;
        background-color: aliceblue;
      }

      .image-item {
        max-width: 128px;
        max-height: 128px;
        padding: 8px;
        background-color: aliceblue;

        img {
          width: 100%;
          height: 100%;
        }
      }

      .show-popmenu {
        width: 16px;
        height: 16px;
        cursor: pointer;
        opacity: 0;

        img {
          width: 100%;
          height: 100%;
        }

        &.sender {
          margin-right: 8px;
        }
        &.receiver {
          margin-left: 8px;
        }
      }
    }
  }

  &:hover {
    .text-message-wrapper {
      .bubble {
        .show-popmenu {
          opacity: 1;
          transition: opacity 1s;
        }
      }
    }
  }
}
